package mn.idax.exchange.otc.domain;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Auther: dison
 * @Date: 2018/7/30 19:27
 * @Description:
 */
@Data
@ApiModel(value = "OTCAdRequest", description = "广告请求对象")
public class OTCAdRequest implements Serializable {
    private static final long serialVersionUID = 5694059840740218088L;

    @ApiModelProperty(value = "广告主键ID")
    private Integer id;
    
    @ApiModelProperty(value = "交易币种名称")
    @NotEmpty(message = "{ad.pairname.notempty}")
    private String pairname;

    @ApiModelProperty(value = "出售价(交易币种单价)")
    @NotNull(message = "{ad.price.notempty}")
    @Digits(integer = 12,fraction = 8,message = "{ad.price.lenth.error}")
    private BigDecimal price;

    @ApiModelProperty(value = "最小交易金额")
    @NotNull(message = "{ad.minamount.notempty}")
    @Digits(integer = 38,fraction = 8,message = "{ad.minamount.lenth.error}")
    private BigDecimal minamount;

    @ApiModelProperty(value = "最大交易金额")
    @NotNull(message = "{ad.maxamount.notempty}")
    @Digits(integer = 38,fraction = 8,message = "{ad.maxamount.lenth.error}")
    private BigDecimal maxamount;

    @ApiModelProperty(value = "交易类型(1-出售 2-购买)")
    @NotNull(message = "{ad.type.notempty}")
    private Integer type;
    
    @ApiModelProperty(value = "是否需要实名认证(false-未认证 true-已认证)")
    @NotNull(message = "{ad.iscertificate.notempty}")
	private Boolean iscertificate;
    
    @ApiModelProperty(value = "问候语")
    private String welcomenote;

    @ApiModelProperty(value = "结束语")
    private String endnote;
    
    @ApiModelProperty(value = "交易说明")
    private String description;

    @ApiModelProperty(value = "交易备注")
    private String remark;
    
    /**
     * 交易支付方式  关联OTCBeneficiarysEnum交易方式类型
     */
    @ApiModelProperty(value = "收款账号信息主键id，数组格式")
    @NotEmpty(message = "{ad.trademode.notempty}")
    private Integer[] trademode;

    private String unit;//法币单位

    private BigDecimal minPrice;//浮动价

    private BigDecimal maxPrice;//浮动价

    private Integer country;//国家

    private Boolean isfloating;//是否是浮动广告

    private BigDecimal floatingrate;//浮动率

    private String exchange;//交易所

    /**
     * 是否需要高级认证
     */
    @ApiModelProperty(value = "是否需要高级认证")
    private Boolean isadvancedcertificate;

    /**
     * 是否需要手机认证
     */
    @ApiModelProperty(value = "是否需要手机认证")
    private Boolean ismoible;

    @ApiModelProperty(value = "数量")
    private BigDecimal number;
}
